package com.data.core.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.common.vo.FileInfoVo;
import com.common.vo.res.FileInfoRes;
import org.springframework.web.multipart.MultipartFile;
import com.data.core.entry.FileInfo;

/**
* @version: V1.0
* @author: szw
* @className: FileInfoService
* @packageName: FileInfoService
* @description: 文件接口
* @data: 2021-1-19 
**/ 
public interface FileInfoService extends IService<FileInfo> {

    /**
     * 文件上传
     * @param fileInfoRes
     * @param files
     * @return
     */
    FileInfoVo upload(FileInfoRes fileInfoRes, MultipartFile[] files);

    /**
     * 查询文件信息
     * @param fileInfoRes
     * @return
     */
    FileInfoVo findFile(FileInfoRes fileInfoRes);

    /**
     * 删除附件
     * @param id
     * @return
     */
    int delete(Long id);

    /**
     * 分页查询附件列表
     * @param page
     * @param fileInfoRes
     * @return
     */
    IPage<FileInfo> findFileInfoVos(Page<FileInfo> page,FileInfoRes fileInfoRes);

    /**
     * 文件更新
     * @param fileInfoRes
     * @param files
     * @return
     */
    FileInfoRes update(FileInfoRes fileInfoRes, MultipartFile[] files);
}
